package com.dianning.web.action;

import java.util.List;

import org.apache.commons.logging.*;

import com.dianning.bean.Area;
import com.dianning.bean.Channel;
import com.dianning.bean.ChannelContact;
import com.dianning.bean.Info;
import com.dianning.bean.Visitor;
import com.dianning.service.AreaService;
import com.dianning.service.ChannelService;
import com.dianning.service.InfoService;
import com.dianning.service.VisitorService;

public class Update extends BaseAction{

	private static final Log logger = LogFactory.getLog(Update.class);

	private ChannelService channelService;
	private AreaService areaService;
	private InfoService infoService;

	public ChannelService getChannelService() {
		return channelService;
	}

	public void setChannelService(ChannelService channelService) {
		this.channelService = channelService;
	}

	public AreaService getAreaService() {
		return areaService;
	}

	public void setAreaService(AreaService areaService) {
		this.areaService = areaService;
	}

	public InfoService getInfoService() {
		return infoService;
	}

	public void setInfoService(InfoService infoService) {
		this.infoService = infoService;
	}

	private Info info;

	public Info getInfo() {
		return info;
	}

	public void setInfo(Info info) {
		this.info = info;
	}

	
	private long id;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String execute() {
		try {
			return this.executeMethod(this.getAction());
		} catch (Exception e) {
			logger.error(e);
			return ERROR;
		}
	}
	public String index(){
		this.setInfo(this.getInfoService().findInfoById(this.id));
		return "finish";
	}
}
